import React, { useState } from 'react';
import './StatusButton.less';

const StatusButton: React.FC = () => {
    const [active, setActive] = useState(true);

    return (
        <div className="listTwo">
            <div className={`box1 ${active ? 'active' : ''}`} onClick={() => setActive(!active)}>
                正常
            </div>
            <div className={`box2 ${active ? '' : 'active'}`} onClick={() => setActive(!active)}>
                异常
            </div>
        </div>
    );
};

export default StatusButton;
